import axios from './axios'
export default{
    //获取列表
    getCate(type,pagenum,pagesize){
        return axios.get(`categories?type=${type}&pagenum=${pagenum}&pagesize=${pagesize}`)
    },
    //父级分类列表
    getParentList(type){
        return axios.get(`categories`,{type})
    },
    //添加分类
    addCateList(form){
        return axios.post(`categories`,form)
    },
    //修改分类对话框
    editCates(id){
        return axios.get(`categories/${id}`)
    },
    //修改信息
    editCateList(id,form){
        return axios.put(`categories/${id}`,form)
    },
    //删除
    removeCates(id){
        return axios.delete(`categories/${id}`)
    }
}